Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added float attribute on element #231

Merged

Conversation

suresh-gangumalla
Copy link
Collaborator

Introduced float attribute to position element at center or right

Introduced float attribute to position element at center or right

Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
@michielvandergeest
Copy link
Collaborator

Thanks for the work so far, a few comments / additional requirements:

  • we initially choose float as an attribute name (to avoid align and position), but let's use placement instead
  • the current implementation only allows for horizontal placement, we should also consider vertical

I think we should support the following use cases:

  • <Element w="100" h="100 placement="center" /> (x and y center)
  • <Element w="100" h="100 placement="right" /> (x right, y top)
  • <Element w="100" h="100 placement="{x: 'center', y: 'bottom'}" /> (x center, y bottom)

suresh-gangumalla and others added 4 commits December 12, 2024 15:24
1. Renamed float attribute to placement
2. Added support for both X-axis and Y-axis placement
3. Added support for object and string values

Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
Signed-off-by: Suresh Kumar Gangumalla <[email protected]>
@michielvandergeest michielvandergeest merged commit c18ba38 into lightning-js:dev Jan 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants